package com.lggry.extendsdemo;

public class Test {
    public static void main(String[] args) {
        //认识继承，好处
        //创建对象，封装老师数据
        //子类可以继承父类的非私有方法
        //子类对象其实是由子类和父类多张设计图共同创建出来的对象，所以子类对象是完整的
        Teacher teacher = new Teacher();
        teacher.setName("李老师");
        teacher.setGender('男');
        teacher.setSkill("Java、vue、mysql");

        Consultant consultant = new Consultant();
        consultant.setName("王老师");
        consultant.setNumber(12);
    }
}
